#可以设置或修改的数值有[50] [300] [200] 以下功能启用务必修改下条指令中的[Green_Peas]为您的玩家名
team join Owner Green_Peas
#如果需要修改以上数值请在以下找到需要修改的项目并进行修改
#使用/tag <房主名字> add/remove openA 开启/关闭 扫地工！
#-------------------------------------------分割线---------------------------------------------------
#计分版准则
scoreboard objectives add number dummy
scoreboard objectives add itemnumber dummy
scoreboard objectives add blocknumber dummy
scoreboard objectives add peacetimeA dummy
scoreboard objectives add peacetimeB dummy
scoreboard objectives add gold dummy
scoreboard objectives add winA dummy  
scoreboard objectives add winB dummy
scoreboard objectives add 交易 trigger
scoreboard objectives add 允许 trigger
scoreboard objectives add pay minecraft.used:minecraft.carrot_on_a_stick
scoreboard objectives add opnumber dummy
scoreboard objectives add havellama dummy
scoreboard objectives add day dummy
#限制实体数量
scoreboard players set @e number 1
scoreboard players operation @a[team=Owner] number += @e[scores={number=1}] number
execute as @a[team=Owner,scores={number=50..}] run tellraw @a [{"text": "[","color": "aqua"},{"text": "Technetium","color": "gold"},{"text": "]","color": "aqua"},{"text":"实体数量超过 50！！！已进行清理","color":"red","bold":true}]
execute as @a[team=Owner,scores={number=50..}] run kill @e[type=!player,scores={number=1}]
scoreboard players set @a[team=Owner] number 0
#限制掉落物数量
scoreboard players set @e[type=item] itemnumber 1
scoreboard players operation @a[team=Owner] itemnumber += @e[type=minecraft:item] itemnumber
execute as @e[team=Owner,scores={itemnumber=300..}] run tellraw @a [{"text": "[","color": "aqua"},{"text": "Technetium","color": "gold"},{"text": "]","color": "aqua"},{"text":"掉落物数量超过 300！！！已清除","color":"red","bold":true}]
execute as @e[team=Owner,scores={itemnumber=300..}] run kill @e[type=item]
scoreboard players set @a[team=Owner] itemnumber 0
#限制下落方块数量
scoreboard players set @e[type=falling_block] blocknumber 1
scoreboard players operation @a[team=Owner] blocknumber += @e[type=minecraft:falling_block] blocknumber
execute as @e[team=Owner,scores={blocknumber=200..}] run tellraw @a [{"text": "[","color": "aqua"},{"text": "Technetium","color": "gold"},{"text": "]","color": "aqua"},{"text":"掉落物数量超过 200！！！已清除","color":"red","bold":true}]
execute as @e[team=Owner,scores={blocknumber=200..}] run kill @e[type=falling_block]
scoreboard players set @a[team=Owner] blocknumber 0
#扫地工【可控制关闭或开启】
scoreboard players add @a[team=Owner,tag=openA] peacetimeB 1
execute as @a[team=Owner,tag=openA,scores={peacetimeB=4800}] run tellraw @a [{"text":"["},{"text":"扫地工","color":"blue"},{"text":"]"},{"text":" 距离清理还剩下1分钟","color":"light_purple","bold":true}]
execute as @a[team=Owner,tag=openA,scores={peacetimeB=5400}] run tellraw @a [{"text":"["},{"text":"扫地工","color":"blue"},{"text":"]"},{"text":" 距离清理还剩下30秒","color":"light_purple","bold":true}]
execute as @a[team=Owner,tag=openA,scores={peacetimeB=5900}] run tellraw @a [{"text":"["},{"text":"扫地工","color":"blue"},{"text":"]"},{"text":" 距离清理还剩下5秒","color":"light_purple","bold":true}]
execute as @a[team=Owner,tag=openA,scores={peacetimeB=6000..}] run tellraw @a [{"text":"["},{"text":"扫地工","color":"blue"},{"text":"]"},{"text":" 成功清理qwq","color":"green","bold":true}]
execute as @a[team=Owner,tag=openA,scores={peacetimeB=6000..}] run kill @e[type=item]
execute as @a[team=Owner,tag=openA,scores={peacetimeB=6000..}] run scoreboard players set @a[team=Owner] peacetimeB 0
#管理员菜单
tag @a[team=OP] add OP
tag @a[team=Owner] add OP
scoreboard players set @a[team=OP] opnumber 1
scoreboard players set @a[team=Owner] opnumber 1
scoreboard players set @e[type=llama,name=菜单] opnumber 1
scoreboard players operation opnumber opnumber += @a[scores={opnumber=1}] opnumber
scoreboard players operation opnumber opnumber -= @e[type=llama,name=菜单] opnumber
execute if score opnumber opnumber matches 1.. run summon llama ~ ~ ~ {CustomName:'{"text":"菜单","color":"yellow","bold":true,"underlined":true}',CustomNameVisible:1b,NoAI:1b,Tame:1b,Strength:5,ChestedHorse:1b,Invulnerable:1b}
execute if score opnumber opnumber matches 1.. run replaceitem entity @e[type=llama,limit=1,name=菜单] horse.2 minecraft:paper{display:{Name:'{"text":"白名单/权限","color":"aqua","bold":true,"italic":false}'},Enchantments:[{id:"",lvl:-1}]}
execute if score opnumber opnumber matches 1.. run replaceitem entity @e[type=llama,limit=1,name=菜单] horse.6 minecraft:bucket{display:{Name:'{"text":"功能开关","color":"yellow","bold":true,"italic":false}'},Enchantments:[{id:"",lvl:1}]}
execute if score opnumber opnumber matches 1.. run replaceitem entity @e[type=llama,limit=1,name=菜单] horse.7 minecraft:redstone_block{display:{Name:'{"text":"注意","color":"red","bold":true,"italic":false}',Lore:['{"text":"1.羊驼距离管理员5格时会传送到附近,可以跨维度","color":"gold","bold":true,"italic":false}','{"text":"2.羊驼会自动清理5格内的掉落物【可在功能处关闭】","color":"gold","italic":false,"bold":true}','{"text":"3.羊驼仅支持管理员队伍和房主队伍使用","color":"gold","bold":true,"italic":false}']},Enchantments:[{id:"",lvl:1}]}
execute if score opnumber opnumber matches 1.. run replaceitem entity @e[type=llama,limit=1,name=菜单] horse.8 clock{display:{Name:'{"text":"时间锁定","color":"dark_aqua","bold":true,"italic":false}'},Enchantments:[{id:"",lvl:1}]}
execute if score opnumber opnumber matches 1.. run replaceitem entity @e[type=llama,limit=1,name=菜单] horse.12 minecraft:ender_pearl{display:{Name:'{"text":"进入维度","color":"dark_purple","bold":true,"italic":false}'},Enchantments:[{id:"",lvl:1}]}
execute if score opnumber opnumber matches ..-1 run kill @e[type=llama,limit=1,name=菜单]
execute if score opnumber opnumber matches ..-1 run kill @e[type=item]
scoreboard players set opnumber opnumber 0
execute as @e[name=菜单,type=llama] at @s run scoreboard players add @p[distance=..15,tag=OP] havellama 1
execute as @a[tag=OP,scores={havellama=0}] at @s run tp @e[type=llama,name=菜单,limit=1,sort=nearest] ^ ^ ^-2
execute as @a[scores={havellama=2..},tag=OP] at @s run tp @e[type=llama,sort=furthest,name=菜单,limit=1] @p[tag=OP,scores={havellama=0}]
scoreboard players set @a[tag=OP] havellama 0
execute as @e[type=llama,name=菜单] at @s unless data entity @s {Items:[{Slot:4b,id:"minecraft:paper"}]} run tellraw @p[tag=OP] [{"text":"----------------------","color":"dark_aqua"},{"text":"\n  权限标签         权限内容","color":"gold","bold":true},{"text":"\n  rs_allow     红石物品权限","color":"white"},{"text":"\n  whitelist      部分违禁品","color":"white"},{"text":"\n   egg           刷怪蛋使用","color":"white"},{"text":"\n-----------------------------","color":"green","bold":false},{"text":"\n输入/tag 玩家名 add或remove 权限标签","color":"green","bold":false},{"text":"\n来为他人添加或移除权限\n→","color":"green","bold":"false"},{"text":"[点击这里]","color":"green","bold":true,"clickEvent":{"action":"run_command","value":"/tag @s add white"}},{"text":"←一键为自己添加权限","color":"green","bold":false}]
execute as @e[type=llama,name=菜单] at @s unless data entity @s {Items:[{Slot:8b,id:"minecraft:bucket"}]} run tellraw @p[tag=OP] ["",{"text":"----------------------","color":"dark_aqua"},{"text":"\n    功 能           开 关","color":"gold","bold":true},{"text":"\n|羊驼清理掉落物|","color":"blue"},{"text":"      [开]","color":"green","clickEvent":{"action":"run_command","value":"/tag @a[team=Owner] add Lclear"},"color":"green"},{"text":"[关]","color":"red","clickEvent":{"action":"run_command","value":"/tag @a[team=Owner] remove Lclear"}},{"text":"\n    |扫地工|","color":"blue"},{"text":"           [开]","color":"green","clickEvent":{"action":"run_command","value":"/tag @a[team=Owner] add openA"},"color":"green"},{"text":"[关]","color":"red","clickEvent":{"action":"run_command","value":"/tag @a[team=Owner] remove openA"}},{"text":"\n   |金币系统|","color":"yellow"},{"text":"          [开]","color":"green","clickEvent":{"action":"run_command","value":"/tag @a[team=Owner] add openB"},"color":"green"},{"text":"[关]","color":"red","clickEvent":{"action":"run_command","value":"/tag @a[team=Owner] remove openB"}}]
execute as @e[type=llama,name=菜单] at @s unless data entity @s {Items:[{Slot:10b,id:"minecraft:clock"}]} run tellraw @p[tag=OP] [{"text":"\n----------时间---------","color":"yellow","bold":true},{"text":"\n[锁定白天]","color":"aqua","clickEvent":{"action":"run_command","value":"/scoreboard players set @a[team=Owner] day 0"}},{"text":"\n[锁定黑夜]","color":"dark_purple","clickEvent":{"action":"run_command","value":"/scoreboard players set @a[team=Owner] day 1"}},{"text":"\n[昼夜更替]","color":"light_purple","clickEvent":{"action":"run_command","value":"/scoreboard players set @a[team=Owner] day 2"}}]
execute as @e[type=llama,name=菜单] at @s unless data entity @s {Items:[{Slot:14b,id:"minecraft:ender_pearl"}]} run tellraw @p[tag=OP] [{"text":"---------进入其他维度----------","color":"dark_blue","bold":true},{"text":"\n[进入维度1]","color":"dark_purple","clickEvent":{"action":"run_command","value":"/forge setdimension @s common:dimension1 0 100 0"}},{"text":" [进入维度2]","color":"dark_purple","clickEvent":{"action":"run_command","value":"/forge setdimension @s common:dimension2 0 100 0"}},{"text":" [进入维度3]","color":"dark_purple","clickEvent":{"action":"run_command","value":"/forge setdimension @s common:dimension3 0 100 0"}},{"text":"\n[进入维度4]","color":"dark_purple","clickEvent":{"action":"run_command","value":"/forge setdimension @s common:dimension4 0 100 0"}},{"text":" [进入维度5]","color":"dark_purple","clickEvent":{"action":"run_command","value":"/forge setdimension @s common:dimension5 0 100 0"}},{"text":" [进入维度6]","color":"dark_purple","clickEvent":{"action":"run_command","value":"/forge setdimension @s common:dimension6 0 100 0"}},{"text":"\n [进入地狱]","color":"red","clickEvent":{"action":"run_command","value":"/forge setdimension @s minecraft:the_nether"}},{"text":"  [进入末地]","color":"yellow","clickEvent":{"action":"run_command","value":"/forge setdimension @s minecraft:the_end"}},{"text":"  [进入主世界]","color":"dark_green","clickEvent":{"action":"run_command","value":"/forge setdimension @s minecraft:overworld 0 100 0"}}]
replaceitem entity @e[type=llama,limit=1,name=菜单] horse.2 minecraft:paper{display:{Name:'{"text":"白名单/权限","color":"aqua","bold":true,"italic":false}'},Enchantments:[{id:"",lvl:-1}]}
replaceitem entity @e[type=llama,limit=1,name=菜单] horse.6 minecraft:bucket{display:{Name:'{"text":"功能开关","color":"yellow","bold":true,"italic":false}'},Enchantments:[{id:"",lvl:1}]}
replaceitem entity @e[type=llama,limit=1,name=菜单] horse.7 minecraft:redstone_block{display:{Name:'{"text":"注意","color":"red","bold":true,"italic":false}',Lore:['{"text":"1.羊驼距离管理员5格时会传送到附近,可以跨维度","color":"gold","bold":true,"italic":false}','{"text":"2.羊驼会自动清理5格内的掉落物【可在功能处关闭】","color":"gold","italic":false,"bold":true}','{"text":"3.羊驼仅支持管理员队伍和房主队伍使用","color":"gold","bold":true,"italic":false}']},Enchantments:[{id:"",lvl:1}]}
replaceitem entity @e[type=llama,limit=1,name=菜单] horse.8 clock{display:{Name:'{"text":"时间锁定","color":"dark_aqua","bold":true,"italic":false}'},Enchantments:[{id:"",lvl:1}]}
replaceitem entity @e[type=llama,limit=1,name=菜单] horse.12 minecraft:ender_pearl{display:{Name:'{"text":"进入维度","color":"dark_purple","bold":true,"italic":false}'},Enchantments:[{id:"",lvl:1}]}
execute as @a[nbt={SelectedItem:{id:"minecraft:hay_block"}},tag=OP] at @s run tp @e[name=菜单,type=minecraft:llama,limit=1,sort=nearest] ^ ^-0.9 ^1 ~ ~
execute as @e[team=Owner,tag=Lclear] at @e[type=llama,name=菜单] run kill @e[type=item,distance=..5]
execute as @a[team=Owner,scores={day=0}] run time set day
execute as @a[team=Owner,scores={day=1}] run time set night
execute as @a[team=Owner,scores={day=2}] run
tag @a[tag=white] add rs_allow
tag @a[tag=white] add whitelist
tag @a[tag=white] add egg
tag @a[tag=white] remove white
#金币系统【可关闭】
execute as @a[team=Owner,tag=openB] run scoreboard players enable @a 交易
execute as @a[team=Owner,tag=openB] run scoreboard players enable @a 允许
execute at @a[scores={pay=1..},] positioned ^ ^ ^1.5 run tag @p[distance=0..1] add 被交易
execute as @a[tag=被交易] at @s run tag @a[scores={pay=1..},sort=nearest,limit=1] add 交易
tellraw @a[tag=交易,scores={pay=1..}] [{"text":"[确定]","clickEvent":{"action":"run_command","value":"/trigger 允许 set 1"},"color":"green"},{"color":"red","text":"\n[取消]","clickEvent":{"action":"run_command","value":"/trigger 允许 set 0"}}]
execute as @a[scores={允许=0}] run tag @a[limit=1,sort=nearest,tag=被交易] remove 被交易
execute as @a[scores={允许=0}] run tag @s remove 交易
execute as @a[scores={允许=0}] run tellraw @s [{"text":"已成功取消:(","color":"green"}]
execute as @a[scores={允许=1}] run scoreboard players operation @s gold -= @s 交易
execute as @a[scores={gold=..-1}] run scoreboard players set @s 允许 -2
execute as @a[scores={允许=1}] run scoreboard players operation @a[limit=1,sort=nearest,tag=被交易] gold += @s 交易
execute as @e[scores={允许=1}] run tellraw @a[limit=1,sort=nearest,tag=被交易] [{"selector":"@s","color":"aqua"},{"text":"给你支付了金币:","color":"yellow","bold":true},{"color":"yellow","bold":true,"score":{"objective":"交易","name":"@s"}}]
execute as @a[scores={允许=1}] run scoreboard players set @s 交易 0
tellraw @a[scores={允许=1}] [{"text":"支付成功:)","color":"green"}]
execute as @a[scores={允许=-2}] run scoreboard players operation @s gold += @s 交易
tellraw @a[scores={允许=-2}] [{"text":"支付失败,余额不足XD","color":"red"}]
scoreboard players set @a[scores={允许=-2}] 交易 0
tag @a[scores={允许=1}] remove 交易
execute as @a[scores={允许=1}] run tag @a[limit=1,sort=nearest,tag=被交易] remove 被交易
tag @a[scores={允许=-2}] remove 交易
execute as @a[scores={允许=-2}] run tag @a[limit=1,sort=nearest,tag=被交易] remove 被交易
scoreboard players set @a pay 0
scoreboard players set @a 允许 -1
tag @a[tag=被交易,tag=交易] remove 被交易
#队伍
team add red
team add blue
team modify red color red
team modify blue color blue
team add builderA
team add builderB
team add builderC
team add builderD
team add builderE
team add specialA
team add specialB
team add specialC
team add specialD
#请保持下两条指令中的英文“Owner”和“OP”不变
team add Owner
team add OP
#----------------------------------------------
team modify OP prefix {"text":"§4§l|巡の警|"}
team modify Owner prefix {"text":"§6§l[摸鱼の房主]"}
team modify builderA prefix {"text":"§c§l|中式建筑师|"}
team modify builderB prefix {"text":"§5§l|中世纪建筑师|"}
team modify builderC prefix {"text":"§7§l|军工建筑师|"}
team modify builderD prefix {"text":"§b§l|现代建筑师|"}
team modify builderE prefix {"text":"§f§l|摸鱼建筑师|"}
team modify specialA prefix {"text":"§c§l》摸鱼带师《"}







